package com.killer_jin.core.common.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

// 自定义过滤器
@WebFilter(filterName = "sessionFilter",urlPatterns = {"/*"})

public class DemoFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }



    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        // Todo
        System.out.println("过滤器开始,一堆操作猛如虎.............................");
        filterChain.doFilter(servletRequest, servletResponse);
        System.out.println("过滤器结束,一看工资两千五.............................");
    }

    @Override
    public void destroy() {

    }
}
